print("Enter words separated by spaces")
def analyze_words(input_string):
    words = input_string.strip().split()
    k = len(words)
    Words = 0
    latin = 0
    short = 0
    l = ""
    llength = 0
    dash = 0
    for word in words:
        if word[0].isupper():
            Words += 1
        if any(char.isalpha() and char.isascii() for char in word):
            latin += 1
        if len(word) <= 3:
            short += 1
        if '-' in word:
            dash += 1
        if len(word) > llength:
            llength= len(word)
            l = word
    print("total entered words:",k)
    print("words starting with an uppercase letter:",Words)
    print("words containing Latin characters:",latin)
    print("number of words containing less than three characters:",short)
    print("number of words containing a dash:",dash)
    print("Longest word: ",l)
    print("its length:",llength)

input_words = input(" ")
result = analyze_words(input_words)
